{extend name="layout/default" /}
{block name="content"}

{/block}
{block name="footer"}

{/block}
{block name="script"}
<script language="javascript">
    document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
        WeixinJSBridge.invoke('getBrandWCPayRequest', {$json},
        function(res){
            if(res.err_msg == "get_brand_wcpay_request:ok")
            {
                window.location= "{:url('lesson/today')}";
            }else{
                alert('支付失败');
                window.location= "{:url('order/index', ['status' => 2])}";
            }
        });
    });
</script>
{/block}
